#include "resultmap.h"

#include <QMap>

ResultMap::ResultMap(QObject *parent)
    : QObject{parent,}
{
    vector = new QVector<QString>();
    map = new QMap<QString,Result>;
    currentIndex =0;
}

void ResultMap::append(const QString str)
{
    vector->push_back(str);
    map->insert(str,Result{});
    currentIndex++;
}

void ResultMap::clear()
{
    vector->clear();
    map->clear();
}

 int ResultMap::size() const
{
     return vector->size();
 }

 QString ResultMap::getVal(int idx) const
 {
     return (*vector)[idx];
 }

 void ResultMap::insert(QString path, Result res)
 {
     map->insert(path,res);
 }







